import Vue from 'vue';
import vuex from 'vuex';

Vue.use(vuex);

const state = {
  showBottomNav: true,
  items: [],
  showNavBar: 'MainPage',
  http: 'http://hwl.meiyiwen.com/',
  // http: 'http://192.168.5.103:8086',
  userid: ''
};
export default new vuex.Store({
   state,
   mutations: {
      alterShowBottomNav (state, index) {
          if (index === 'true') {
            state.showBottomNav = true;
          } else {
            state.showBottomNav = false;
          }
      },
      showNavBar (state, index) {
        state.showNavBar = index;
      },
      getUserId (state, index) {
        state.userid = index;
      }
   },
   strict: process.env.NODE_ENV !== 'production'
});
